package com.gaber.service.impl;

import com.gaber.dao.UserDao;
import com.gaber.service.UserService;

import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

public class UserServiceImpl2 implements UserService {

    //注入List
    private List<String> stringList;

    public void setStringList(List<String> stringList) {
        this.stringList = stringList;
    }

    //userdao list
    private List<UserDao> userDaoList;
    public void setUserDaoList(List<UserDao> userDaoList) {
        this.userDaoList = userDaoList;
    }

    //Set
    private Set<String> strSet;
    public void setStrSet(Set<String> strSet) {
        this.strSet = strSet;
    }

    //Set UserDao
    private Set<UserDao> userDaoSet;
    public void setUserDaoSet(Set<UserDao> userDaoSet) {
        this.userDaoSet = userDaoSet;
    }

    //Map
    private Map<String, UserDao> map;
    public void setMap(Map<String, UserDao> map) {
        this.map = map;
    }

    //Properties
    private Properties properties;
    public void setProperties(Properties properties) {
        this.properties = properties;
    }


    public void show() {
        System.out.println(stringList);
        System.out.println(userDaoList);
        System.out.println(strSet);
        System.out.println(userDaoSet);
        System.out.println(map);
        System.out.println(properties);
    }

    private UserDao userDao;

    //Beanfactory去调用该方法 从容器中获得userDao设置到此处
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
        System.out.println("Beanfactory去调用该方法 从容器中获得userDao设置到此处："+userDao);
    }
}
